package cn.edu.zhku.dto;

import cn.edu.zhku.pojo.form.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
public class FormDto extends BaseDto {

    @ApiModelProperty("植株编号")
    private String plantNo;
    @ApiModelProperty("植株生长阶段（发芽出苗期，幼苗期，开花下针期，结荚期，饱果成熟期）")
    private String plantGrowthStage;
    @ApiModelProperty(value = "提交时间")
    private Date submitTime;
    @ApiModelProperty("表型性状id")
    private Integer phenotypeId;
    @ApiModelProperty("植株性状id")
    private Integer plantTraitsId;
    @ApiModelProperty("主茎id")
    private Integer mainStemId;
    @ApiModelProperty("主茎高")
    private Double msHeight;
    @ApiModelProperty("主茎粗")
    private Double msThickness;
    @ApiModelProperty("主茎节数")
    private Integer msNodeNum;
    @ApiModelProperty("收获时青片叶数")
    private Double greenLeavesNum;
    @ApiModelProperty("第一对侧枝id")
    private Integer fpolBranchesId;
    @ApiModelProperty("侧枝长度")
    private Double sideBranchLen;
    @ApiModelProperty("侧枝粗")
    private Double sideBranchThickness;
    @ApiModelProperty("分枝id")
    private Integer branchId;
    @ApiModelProperty("总分枝数")
    private Integer totalBranches;
    @ApiModelProperty("有效分枝数")
    private Integer effectiveBranches;
    @ApiModelProperty("分枝复叶性状id")
    private Integer baclTraitsId;
    @ApiModelProperty("分枝复叶性状_叶柄id")
    private Integer baclPetioleId;
    @ApiModelProperty("分枝复叶性状_叶柄_叶柄长")
    private Double baclPetioleLen;
    @ApiModelProperty("分枝复叶性状_叶柄_前后小叶叶柄距")
    private Double baclPdoaapl;
    @ApiModelProperty("分枝复叶性状_小叶id")
    private Integer baclLeafletId;
    @ApiModelProperty("分枝复叶性状_小叶_基部左小叶长")
    private Double baclBlll;
    @ApiModelProperty("分枝复叶性状_小叶_基部左小叶宽")
    private Double baclBllw;
    @ApiModelProperty("分枝复叶性状_小叶_基部右小叶长")
    private Double baclBrll;
    @ApiModelProperty("分枝复叶性状_小叶_基部右小叶宽")
    private Double baclBrlw;
    @ApiModelProperty("分枝复叶性状_小叶_顶端左小叶长")
    private Double baclAlll;
    @ApiModelProperty("分枝复叶性状_小叶_顶端左小叶宽")
    private Double baclAllw;
    @ApiModelProperty("分枝复叶性状_小叶_顶端右小叶长")
    private Double baclArll;
    @ApiModelProperty("分枝复叶性状_小叶_顶端右小叶宽")
    private Double baclArlw;
    @ApiModelProperty("主茎复叶性状id")
    private Integer msclTraitsId;
    @ApiModelProperty("主茎复叶性状_叶柄id")
    private Integer msclPetioleId;
    @ApiModelProperty("主茎复叶性状_叶柄_叶柄长")
    private Double msclPetioleLen;
    @ApiModelProperty("主茎复叶性状_叶柄_前后小叶叶柄距")
    private Double msclPdoaapl;
    @ApiModelProperty("主茎复叶性状_小叶id")
    private Integer msclLeafletId;
    @ApiModelProperty("主茎复叶性状_小叶_基部左小叶长")
    private Double msclBlll;
    @ApiModelProperty("主茎复叶性状_小叶_基部左小叶宽")
    private Double msclBllw;
    @ApiModelProperty("主茎复叶性状_小叶_基部右小叶长")
    private Double msclBrll;
    @ApiModelProperty("主茎复叶性状_小叶_基部右小叶宽")
    private Double msclBrlw;
    @ApiModelProperty("主茎复叶性状_小叶_顶端左小叶长")
    private Double msclAlll;
    @ApiModelProperty("主茎复叶性状_小叶_顶端左小叶宽")
    private Double msclAllw;
    @ApiModelProperty("主茎复叶性状_小叶_顶端右小叶长")
    private Double msclArll;
    @ApiModelProperty("主茎复叶性状_小叶_顶端右小叶宽")
    private Double msclArlw;
    @ApiModelProperty("单株结荚性状id")
    private Integer sppTraitsId;
    @ApiModelProperty("荚果id")
    private Integer podsId;
    @ApiModelProperty("单株总果数")
    private Integer totalFruitNum;
    @ApiModelProperty("单株秕果数")
    private Integer uncutFruitNum;
    @ApiModelProperty("单株饱果数")
    private Integer fullFruitNum;
    @ApiModelProperty("单株芽果数")
    private Integer budsFruitNum;
    @ApiModelProperty("单株烂果数")
    private Integer rottenFruitNum;
    @ApiModelProperty("单株单果数")
    private Integer singleFruitNum;
    @ApiModelProperty("单株双果数")
    private Integer doubleFruitNum;
    @ApiModelProperty("单株三果数")
    private Integer threeFruitNum;
    @ApiModelProperty("单株四果数")
    private Integer fourFruitNum;
    @ApiModelProperty("单株五果数")
    private Integer fiveFruitNum;
    @ApiModelProperty("第一对侧枝结果数")
    private Integer fpsbNum;
    @ApiModelProperty("第二对侧枝结果数")
    private Integer spsbNum;
    @ApiModelProperty("其他侧枝结果数")
    private Integer osbNum;

    public Form getForm() {
        Form form = new Form();
        form.setFormId(this.formId);
        form.setGroupId(this.groupId);
        form.setTaskId(this.taskId);
        form.setUserId(this.userId);
        if (this.plantNo != null) form.setPlantNo(this.plantNo.trim());
        if (this.plantGrowthStage != null) form.setPlantGrowthStage(this.plantGrowthStage.trim());
        form.setSubmitTime(this.submitTime);
        form.setState(this.state);
        return form;
    }

    public Phenotype getPhenotype() {
        Phenotype phenotype = new Phenotype();
        phenotype.setPhenotypeId(this.phenotypeId);
        return phenotype;
    }

    public PlantTraits getPlantTraits() {
        PlantTraits plantTraits = new PlantTraits();
        plantTraits.setPlantTraitsId(this.plantTraitsId);
        return plantTraits;
    }

    public BaclTraits getBaclTraits() {
        BaclTraits baclTraits = new BaclTraits();
        baclTraits.setBaclTraitsId(this.baclTraitsId);
        return baclTraits;
    }

    public MsclTraits getMsclTraits() {
        MsclTraits msclTraits = new MsclTraits();
        msclTraits.setMsclTraitsId(this.msclTraitsId);
        return msclTraits;
    }

    public SppTraits getSppTraits() {
        SppTraits sppTraits = new SppTraits();
        sppTraits.setSppTraitsId(this.sppTraitsId);
        return sppTraits;
    }

    public MainStem getMainStem() {
        MainStem mainStem = new MainStem();
        mainStem.setMainStemId(this.mainStemId);
        mainStem.setMsHeight(this.msHeight);
        mainStem.setMsThickness(this.msThickness);
        mainStem.setMsNodeNum(this.msNodeNum);
        mainStem.setGreenLeavesNum(this.greenLeavesNum);
        return mainStem;
    }

    public FpolBranches getFpolBranches() {
        FpolBranches fpolBranches = new FpolBranches();
        fpolBranches.setFpolBranchesId(this.fpolBranchesId);
        fpolBranches.setSideBranchLen(this.sideBranchLen);
        fpolBranches.setSideBranchThickness(this.sideBranchThickness);
        return fpolBranches;
    }

    public Branch getBranch() {
        Branch branch = new Branch();
        branch.setBranchId(this.branchId);
        branch.setTotalBranches(this.totalBranches);
        branch.setEffectiveBranches(this.effectiveBranches);
        return branch;
    }

    public Petiole getBaclPetiole() {
        Petiole baclPetiole = new Petiole();
        baclPetiole.setPetioleId(this.baclPetioleId);
        baclPetiole.setPetioleLen(this.baclPetioleLen);
        baclPetiole.setPdoaapl(this.baclPdoaapl);
        return baclPetiole;
    }

    public Leaflet getBaclLeaflet() {
        Leaflet baclLeaflet = new Leaflet();
        baclLeaflet.setLeafletId(this.baclLeafletId);
        baclLeaflet.setArll(this.baclArll);
        baclLeaflet.setArlw(this.baclArlw);
        baclLeaflet.setBrll(this.baclBrll);
        baclLeaflet.setBrlw(this.baclBrlw);
        baclLeaflet.setAlll(this.baclAlll);
        baclLeaflet.setAllw(this.baclAllw);
        baclLeaflet.setBlll(this.baclBlll);
        baclLeaflet.setBllw(this.baclBllw);
        return baclLeaflet;
    }

    public Petiole getMsclPetiole() {
        Petiole msclPetiole = new Petiole();
        msclPetiole.setPetioleId(this.msclPetioleId);
        msclPetiole.setPetioleLen(this.msclPetioleLen);
        msclPetiole.setPdoaapl(this.msclPdoaapl);
        return msclPetiole;
    }

    public Leaflet getMsclLeaflet() {
        Leaflet msclLeaflet = new Leaflet();
        msclLeaflet.setLeafletId(this.msclLeafletId);
        msclLeaflet.setArll(this.msclArll);
        msclLeaflet.setArlw(this.msclArlw);
        msclLeaflet.setBrll(this.msclBrll);
        msclLeaflet.setBrlw(this.msclBrlw);
        msclLeaflet.setAlll(this.msclAlll);
        msclLeaflet.setAllw(this.msclAllw);
        msclLeaflet.setBlll(this.msclBlll);
        msclLeaflet.setBllw(this.msclBllw);
        return msclLeaflet;
    }

    public Pods getPods() {
        Pods pods = new Pods();
        pods.setPodsId(this.podsId);
        pods.setTotalFruitNum(this.totalFruitNum);
        pods.setUncutFruitNum(this.uncutFruitNum);
        pods.setFullFruitNum(this.fullFruitNum);
        pods.setBudsFruitNum(this.budsFruitNum);
        pods.setRottenFruitNum(this.rottenFruitNum);
        pods.setSingleFruitNum(this.singleFruitNum);
        pods.setDoubleFruitNum(this.doubleFruitNum);
        pods.setThreeFruitNum(this.threeFruitNum);
        pods.setFourFruitNum(this.fourFruitNum);
        pods.setFiveFruitNum(this.fiveFruitNum);
        pods.setFpsbNum(this.fpsbNum);
        pods.setSpsbNum(this.spsbNum);
        pods.setOsbNum(this.osbNum);
        return pods;
    }

}
